import router from "./router";
import NProgress from "nprogress"; 
import { Base64 } from "js-base64";
router.beforeEach((to, from, next) => {
  console.log(to,'tooo');
  if(to.path == '/')
    {
      NProgress.start()
      const vl = 'qds'
      const b =    Base64.encode(vl)
      next({ path: `/admin/home?uid=${b}` });
    }
    else
    {
      NProgress.start()
      next()
    }
  })
  router.afterEach(() => {
    NProgress.done()
  })